package cn.zzn.batch.tasks;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Job1 implements org.quartz.Job {

	private static final Logger logger = LoggerFactory.getLogger(Job1.class);

	private String username;

	@Override
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		
		String message = String.format("username = %s", username);

		System.out.println("**************************");
		logger.info(message);

		context.setResult(message);
		
	}

	public void setUsername(String username) {
		this.username = username;
	}
}